<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>control::Timer</title>
  <meta http-equiv='Content-type' content='text/html;charset=UTF-8' />
  <link rel='stylesheet' type='text/css' href='../style.css'/>
</head>
<body>
<p>
  <a href='../index.html'>
    <img src='../logo.png' alt='Sedona'/>
  </a>
</p>
<div class='nav'>
  <a href='../index.html'>Index</a> |
  <a href='../api.html'>Kits</a> |
  <a href='index.html'>control</a>
</div>
<h1 class='title'>control::Timer</h1>
<hr/>
<pre class='inheritance'><a href='../sys/Obj.html'>sys::Obj</a>
  <a href='../sys/Virtual.html'>sys::Virtual</a>
    <a href='../sys/Component.html'>sys::Component</a>
      control::Timer
</pre>
<em>public </em> class <b>Timer</b>  [niagaraIcon=&#x22;module://icons/x16/clock.png&#x22;]<br>
<hr/>
<p>Timer outputs a pulse for the configured amount of time&#xa;&#x22;in&#x22; is used to fire the timer:</p>
<pre class='doc'>   - if low, out is forced to false&#xa;   - if high, out = 1 until timer reaches &#x22;time&#x22; seconds&#xa; Alternatively, the pulse can be fired from the &#x22;Start Timer&#x22; action if in is not linked.</pre>
<hr/>
<dl>
<dt>changed</dt>
<dd><p class='sig'><code><em><em>public</em> <em>virtual</em> <em>override</em> </em><b>void changed(<a href='../sys/Slot.html'>Slot</a> slot)</b>

</code></p>
<p>override changed to recompute ms length of the timer if the time changes</p>
</dd>
<dt>execute</dt>
<dd><p class='sig'><code><em><em>public</em> <em>virtual</em> <em>override</em> </em><b>void execute()</b>

</code></p>
<p>Execute is called once every scan.</p>
</dd>
<dt>left</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>int left</b> [summary, unit=&#x22;second&#x22;, readonly]

</code></p>
<p>Time left on the timer if running&#xa;If not running, this value is 0</p>
</dd>
<dt>out</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>bool out</b> [readonly]

</code></p>
<p>The timed output pulse</p>
</dd>
<dt>resetTimer</dt>
<dd><p class='sig'><code><em><em>public</em> <em>action</em> </em><b>void resetTimer()</b>

</code></p>
<p>Action to reset the timer.  Any time already in progress is immediately canceled,&#xa;and the &#x22;left&#x22; is set to 0 sec</p>
</dd>
<dt>run</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>bool run</b> [falseText=&#x22;stop&#x22;, trueText=&#x22;run&#x22;]

</code></p>
<p>Used to fire the timer on transition from false -&gt; true</p>
</dd>
<dt>start</dt>
<dd><p class='sig'><code><em><em>public</em> <em>virtual</em> <em>override</em> </em><b>void start()</b>

</code></p>
<p>start computes the ms length of the timer</p>
</dd>
<dt>startTimer</dt>
<dd><p class='sig'><code><em><em>public</em> <em>action</em> </em><b>void startTimer()</b>

</code></p>
<p>Used to manually start the timer in cases where there is no link to &#x22;in&#x22; property&#xa;Issuing this command while the timer is already active will reset/restart the timer</p>
</dd>
<dt>time</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>int time</b> [summary, config, unit=&#x22;second&#x22;]

</code></p>
<p>desired duration of the output pulse</p>
</dd>
</dl>
<div class='nav'>
  <a href='../index.html'>Index</a> |
  <a href='../api.html'>Kits</a> |
  <a href='index.html'>control</a>
</div>
<div class='copyright'>Copyright &#169; 2009, Tridium, Inc.</div>
</body>
</html>
